#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "tolua++.h"

/* Exported function */
TOLUA_API int  tolua_luaQPen_open (lua_State* tolua_S);

#include "./../luaQt.h"
#include "./../luaQPen.h"

/* function to release collected object via destructor */
#ifdef __cplusplus

static int tolua_collect_QColor (lua_State* tolua_S)
{
 QColor* self = (QColor*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_qreal (lua_State* tolua_S)
{
 qreal* self = (qreal*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_QPen (lua_State* tolua_S)
{
 QPen* self = (QPen*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_QVector_qreal_ (lua_State* tolua_S)
{
 QVector<qreal>* self = (QVector<qreal>*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_QBrush (lua_State* tolua_S)
{
 QBrush* self = (QBrush*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}
#endif


/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
 tolua_usertype(tolua_S,"QColor");
 tolua_usertype(tolua_S,"qreal");
 tolua_usertype(tolua_S,"QPen");
 tolua_usertype(tolua_S,"QVector<qreal>");
 tolua_usertype(tolua_S,"QBrush");
}

/* method: new of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_new00
static int tolua_luaQPen_QPen_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   QPen* tolua_ret = (QPen*)  Mtolua_new((QPen)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QPen");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_new00_local
static int tolua_luaQPen_QPen_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   QPen* tolua_ret = (QPen*)  Mtolua_new((QPen)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QPen");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_new01
static int tolua_luaQPen_QPen_new01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QPen",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  Qt::PenStyle tolua_var_1 = ((Qt::PenStyle) (int)  tolua_tonumber(tolua_S,2,0));
  {
   QPen* tolua_ret = (QPen*)  Mtolua_new((QPen)(tolua_var_1));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QPen");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQPen_QPen_new00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_new01_local
static int tolua_luaQPen_QPen_new01_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QPen",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  Qt::PenStyle tolua_var_1 = ((Qt::PenStyle) (int)  tolua_tonumber(tolua_S,2,0));
  {
   QPen* tolua_ret = (QPen*)  Mtolua_new((QPen)(tolua_var_1));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QPen");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQPen_QPen_new00_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_new02
static int tolua_luaQPen_QPen_new02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QPen",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QColor",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QColor* color = ((const QColor*)  tolua_tousertype(tolua_S,2,0));
  {
   QPen* tolua_ret = (QPen*)  Mtolua_new((QPen)(*color));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QPen");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQPen_QPen_new01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_new02_local
static int tolua_luaQPen_QPen_new02_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QPen",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QColor",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QColor* color = ((const QColor*)  tolua_tousertype(tolua_S,2,0));
  {
   QPen* tolua_ret = (QPen*)  Mtolua_new((QPen)(*color));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QPen");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQPen_QPen_new01_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_new03
static int tolua_luaQPen_QPen_new03(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QPen",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QPen",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QPen* pen = ((const QPen*)  tolua_tousertype(tolua_S,2,0));
  {
   QPen* tolua_ret = (QPen*)  Mtolua_new((QPen)(*pen));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QPen");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQPen_QPen_new02(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_new03_local
static int tolua_luaQPen_QPen_new03_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QPen",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QPen",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QPen* pen = ((const QPen*)  tolua_tousertype(tolua_S,2,0));
  {
   QPen* tolua_ret = (QPen*)  Mtolua_new((QPen)(*pen));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QPen");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQPen_QPen_new02_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: delete of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_delete00
static int tolua_luaQPen_QPen_delete00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL);
#endif
  Mtolua_delete(self);
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: dashPattern of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_dashPattern00
static int tolua_luaQPen_QPen_dashPattern00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'dashPattern'", NULL);
#endif
  {
   QVector<qreal> tolua_ret = (QVector<qreal>)  self->dashPattern();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((QVector<qreal>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"QVector<qreal>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(QVector<qreal>));
     tolua_pushusertype(tolua_S,tolua_obj,"QVector<qreal>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'dashPattern'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setDashPattern of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_setDashPattern00
static int tolua_luaQPen_QPen_setDashPattern00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QVector<qreal>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
  const QVector<qreal>* pattern = ((const QVector<qreal>*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setDashPattern'", NULL);
#endif
  {
   self->setDashPattern(*pattern);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setDashPattern'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: dashOffset of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_dashOffset00
static int tolua_luaQPen_QPen_dashOffset00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'dashOffset'", NULL);
#endif
  {
   qreal tolua_ret = (qreal)  self->dashOffset();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((qreal)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"qreal");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(qreal));
     tolua_pushusertype(tolua_S,tolua_obj,"qreal");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'dashOffset'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setDashOffset of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_setDashOffset00
static int tolua_luaQPen_QPen_setDashOffset00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"qreal",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
  qreal doffset = *((qreal*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setDashOffset'", NULL);
#endif
  {
   self->setDashOffset(doffset);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setDashOffset'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: miterLimit of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_miterLimit00
static int tolua_luaQPen_QPen_miterLimit00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'miterLimit'", NULL);
#endif
  {
   qreal tolua_ret = (qreal)  self->miterLimit();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((qreal)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"qreal");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(qreal));
     tolua_pushusertype(tolua_S,tolua_obj,"qreal");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'miterLimit'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setMiterLimit of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_setMiterLimit00
static int tolua_luaQPen_QPen_setMiterLimit00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"qreal",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
  qreal limit = *((qreal*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setMiterLimit'", NULL);
#endif
  {
   self->setMiterLimit(limit);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setMiterLimit'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: widthF of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_widthF00
static int tolua_luaQPen_QPen_widthF00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'widthF'", NULL);
#endif
  {
   qreal tolua_ret = (qreal)  self->widthF();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((qreal)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"qreal");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(qreal));
     tolua_pushusertype(tolua_S,tolua_obj,"qreal");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'widthF'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setWidthF of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_setWidthF00
static int tolua_luaQPen_QPen_setWidthF00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"qreal",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
  qreal width = *((qreal*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setWidthF'", NULL);
#endif
  {
   self->setWidthF(width);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setWidthF'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: width of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_width00
static int tolua_luaQPen_QPen_width00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'width'", NULL);
#endif
  {
   int tolua_ret = (int)  self->width();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'width'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setWidth of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_setWidth00
static int tolua_luaQPen_QPen_setWidth00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
  int width = ((int)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setWidth'", NULL);
#endif
  {
   self->setWidth(width);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setWidth'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: color of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_color00
static int tolua_luaQPen_QPen_color00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'color'", NULL);
#endif
  {
   QColor tolua_ret = (QColor)  self->color();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((QColor)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"QColor");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(QColor));
     tolua_pushusertype(tolua_S,tolua_obj,"QColor");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'color'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setColor of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_setColor00
static int tolua_luaQPen_QPen_setColor00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QColor",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
  const QColor* color = ((const QColor*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setColor'", NULL);
#endif
  {
   self->setColor(*color);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setColor'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: brush of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_brush00
static int tolua_luaQPen_QPen_brush00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'brush'", NULL);
#endif
  {
   QBrush tolua_ret = (QBrush)  self->brush();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((QBrush)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(QBrush));
     tolua_pushusertype(tolua_S,tolua_obj,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'brush'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setBrush of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_setBrush00
static int tolua_luaQPen_QPen_setBrush00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QBrush",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
  const QBrush* brush = ((const QBrush*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setBrush'", NULL);
#endif
  {
   self->setBrush(*brush);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setBrush'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: isSolid of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_isSolid00
static int tolua_luaQPen_QPen_isSolid00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'isSolid'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->isSolid();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'isSolid'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: capStyle of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_capStyle00
static int tolua_luaQPen_QPen_capStyle00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'capStyle'", NULL);
#endif
  {
   Qt::PenCapStyle tolua_ret = (Qt::PenCapStyle)  self->capStyle();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'capStyle'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setCapStyle of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_setCapStyle00
static int tolua_luaQPen_QPen_setCapStyle00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
  Qt::PenCapStyle pcs = ((Qt::PenCapStyle) (int)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setCapStyle'", NULL);
#endif
  {
   self->setCapStyle(pcs);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setCapStyle'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: joinStyle of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_joinStyle00
static int tolua_luaQPen_QPen_joinStyle00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'joinStyle'", NULL);
#endif
  {
   Qt::PenJoinStyle tolua_ret = (Qt::PenJoinStyle)  self->joinStyle();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'joinStyle'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setJoinStyle of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_setJoinStyle00
static int tolua_luaQPen_QPen_setJoinStyle00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
  Qt::PenJoinStyle pcs = ((Qt::PenJoinStyle) (int)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setJoinStyle'", NULL);
#endif
  {
   self->setJoinStyle(pcs);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setJoinStyle'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: isCosmetic of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_isCosmetic00
static int tolua_luaQPen_QPen_isCosmetic00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QPen* self = (const QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'isCosmetic'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->isCosmetic();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'isCosmetic'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setCosmetic of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_setCosmetic00
static int tolua_luaQPen_QPen_setCosmetic00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
  bool cosmetic = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setCosmetic'", NULL);
#endif
  {
   self->setCosmetic(cosmetic);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setCosmetic'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: isDetached of class  QPen */
#ifndef TOLUA_DISABLE_tolua_luaQPen_QPen_isDetached00
static int tolua_luaQPen_QPen_isDetached00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QPen",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QPen* self = (QPen*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'isDetached'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->isDetached();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'isDetached'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* Open function */
TOLUA_API int tolua_luaQPen_open (lua_State* tolua_S)
{
 tolua_open(tolua_S);
 tolua_reg_types(tolua_S);
 tolua_module(tolua_S,NULL,0);
 tolua_beginmodule(tolua_S,NULL);
  tolua_module(tolua_S,"Qt",0);
  tolua_beginmodule(tolua_S,"Qt");
   tolua_constant(tolua_S,"NoPen",Qt::NoPen);
   tolua_constant(tolua_S,"SolidLine",Qt::SolidLine);
   tolua_constant(tolua_S,"DashLine",Qt::DashLine);
   tolua_constant(tolua_S,"DotLine",Qt::DotLine);
   tolua_constant(tolua_S,"DashDotLine",Qt::DashDotLine);
   tolua_constant(tolua_S,"DashDotDotLine",Qt::DashDotDotLine);
   tolua_constant(tolua_S,"CustomDashLine",Qt::CustomDashLine);
   tolua_constant(tolua_S,"MPenStyle",Qt::MPenStyle);
   tolua_constant(tolua_S,"FlatCap",Qt::FlatCap);
   tolua_constant(tolua_S,"SquareCap",Qt::SquareCap);
   tolua_constant(tolua_S,"RoundCap",Qt::RoundCap);
   tolua_constant(tolua_S,"MPenCapStyle",Qt::MPenCapStyle);
   tolua_constant(tolua_S,"MiterJoin",Qt::MiterJoin);
   tolua_constant(tolua_S,"BevelJoin",Qt::BevelJoin);
   tolua_constant(tolua_S,"RoundJoin",Qt::RoundJoin);
   tolua_constant(tolua_S,"SvgMiterJoin",Qt::SvgMiterJoin);
   tolua_constant(tolua_S,"MPenJoinStyle",Qt::MPenJoinStyle);
  tolua_endmodule(tolua_S);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"QPen","QPen","",tolua_collect_QPen);
  #else
  tolua_cclass(tolua_S,"QPen","QPen","",NULL);
  #endif
  tolua_beginmodule(tolua_S,"QPen");
   tolua_function(tolua_S,"new",tolua_luaQPen_QPen_new00);
   tolua_function(tolua_S,"new_local",tolua_luaQPen_QPen_new00_local);
   tolua_function(tolua_S,".call",tolua_luaQPen_QPen_new00_local);
   tolua_function(tolua_S,"new",tolua_luaQPen_QPen_new01);
   tolua_function(tolua_S,"new_local",tolua_luaQPen_QPen_new01_local);
   tolua_function(tolua_S,".call",tolua_luaQPen_QPen_new01_local);
   tolua_function(tolua_S,"new",tolua_luaQPen_QPen_new02);
   tolua_function(tolua_S,"new_local",tolua_luaQPen_QPen_new02_local);
   tolua_function(tolua_S,".call",tolua_luaQPen_QPen_new02_local);
   tolua_function(tolua_S,"new",tolua_luaQPen_QPen_new03);
   tolua_function(tolua_S,"new_local",tolua_luaQPen_QPen_new03_local);
   tolua_function(tolua_S,".call",tolua_luaQPen_QPen_new03_local);
   tolua_function(tolua_S,"delete",tolua_luaQPen_QPen_delete00);
   tolua_function(tolua_S,"dashPattern",tolua_luaQPen_QPen_dashPattern00);
   tolua_function(tolua_S,"setDashPattern",tolua_luaQPen_QPen_setDashPattern00);
   tolua_function(tolua_S,"dashOffset",tolua_luaQPen_QPen_dashOffset00);
   tolua_function(tolua_S,"setDashOffset",tolua_luaQPen_QPen_setDashOffset00);
   tolua_function(tolua_S,"miterLimit",tolua_luaQPen_QPen_miterLimit00);
   tolua_function(tolua_S,"setMiterLimit",tolua_luaQPen_QPen_setMiterLimit00);
   tolua_function(tolua_S,"widthF",tolua_luaQPen_QPen_widthF00);
   tolua_function(tolua_S,"setWidthF",tolua_luaQPen_QPen_setWidthF00);
   tolua_function(tolua_S,"width",tolua_luaQPen_QPen_width00);
   tolua_function(tolua_S,"setWidth",tolua_luaQPen_QPen_setWidth00);
   tolua_function(tolua_S,"color",tolua_luaQPen_QPen_color00);
   tolua_function(tolua_S,"setColor",tolua_luaQPen_QPen_setColor00);
   tolua_function(tolua_S,"brush",tolua_luaQPen_QPen_brush00);
   tolua_function(tolua_S,"setBrush",tolua_luaQPen_QPen_setBrush00);
   tolua_function(tolua_S,"isSolid",tolua_luaQPen_QPen_isSolid00);
   tolua_function(tolua_S,"capStyle",tolua_luaQPen_QPen_capStyle00);
   tolua_function(tolua_S,"setCapStyle",tolua_luaQPen_QPen_setCapStyle00);
   tolua_function(tolua_S,"joinStyle",tolua_luaQPen_QPen_joinStyle00);
   tolua_function(tolua_S,"setJoinStyle",tolua_luaQPen_QPen_setJoinStyle00);
   tolua_function(tolua_S,"isCosmetic",tolua_luaQPen_QPen_isCosmetic00);
   tolua_function(tolua_S,"setCosmetic",tolua_luaQPen_QPen_setCosmetic00);
   tolua_function(tolua_S,"isDetached",tolua_luaQPen_QPen_isDetached00);
  tolua_endmodule(tolua_S);
 tolua_endmodule(tolua_S);
 return 1;
}


#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
 TOLUA_API int luaopen_luaQPen (lua_State* tolua_S) {
 return tolua_luaQPen_open(tolua_S);
};
#endif

